<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUploadLogTable extends Migration
{
    public function up()
    {
        Schema::create('upload_log', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('type', false, true)->default(0);
            $table->string('url', 80)->default('');
            $table->string('name', 30)->default('');
            $table->string('mime', 30)->default('');
            $table->mediumInteger('size', false, true)->default(0);
            $table->integer('created_by', false, true)->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    public function down()
    {
        Schema::dropIfExists('upload_log');
    }
}
